<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<#include "/admin/include/head.htm">
<script type="text/javascript">
            
    $(document).ready(function(){
		var mainform = $("#mainform");  
		//表单底部按钮 
    	LG.setFormDefaultBtn(f_cancel, function(){
			f_save(mainform, "paymentType_list");
		});
    });
    
</script>
</head>
<#if !paymentType??>
	<#assign isAdd = true />
<#else>
	<#assign isEdit = true />
</#if>
<body style="padding:10px; overflow:hidden;">
	<div id="tabcontainer" style="margin:0; padding:0">
		<form id="mainform" name="mainform" class="validate" action="<#if isAdd??>save.jhtml<#else>update.jhtml</#if>" method="post" class="validate">
			<input type="hidden" name="id" value="${(paymentType.id)!''}"/>
			<input type="hidden" name="paymentBundleId" value="${(paymentBundleId)!''}"/>
			<table class="table">
				<tr>
					<th>关联组件：</th>
					<td>
						<@u.select headerKey="" headerValue="" listKey="id" listValue="name"
							headerButtom="false" list=components value="${(paymentType.component.id)!''}"
							name="component.id" class="{required: true}"/>
					</td>
				</tr>
				<tr>
					<th>名称：</th>
					<td>
						<input type="text" name="name" value="${(paymentType.name)!''}" 
							class="formText {required: true, minlength: 2, maxlength: 20, remote: 'checkName.jhtml?oldValue=${(paymentType.name)!}', messages: {remote: '支付方式名称已存在!'}}" />
					</td>
				</tr>
				<tr>
					<th>是否启用：</th>
					<td>
						<@u.radio name="available" list={'true': '是', 'false':'否'} 
							value="${((paymentType.available)?string('true', 'false'))!'true'}"/>
					</td>	
				</tr>
				<tr>
					<th>支付类型：</th>
					<td>
						<@u.select_map listKey='key' listValue='name' headerKey="" headerValue="" value="${(paymentType.payType)!''}"
							headerButtom="false" list=payTypes
							name="payType" class="{required: true}"/>
					</td>
				</tr>
				<tr>
					<th>备注：</th>
					<td>
						<textarea class="formArea" name="description" style="width: 354px; height: 130px;resize:none;" class="formArea {maxlength: 250}">${(paymentType.description)!''}</textarea>
					</td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>